
def toSum(nums, target):
    hashmap = {}
    for i, num, in enumerate(nums):
        if hashmap.get(target-num) is not None:
            print(i, num)
            return [i, hashmap.get(target-num)]
        hashmap[num] = i
        # print(i, num)

# res = toSum([2,3,4], 6)
# print(res)



import re
def reFscMqttCmd():
    parent = ''
    res = re.match('fsc/(.*?)/([a-zA-Z0-9]{8,16})/tx', 'fsc/FSC-01/929394sdfsfd9/tx', re.M|re.I)
    print(res)
    print(res.group(0))
    print(res.group(1))
    print(res.group(2))

reFscMqttCmd()
